package com.byzk.p2p.admin.system.controller;

import java.io.Serializable;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import com.byzk.p2p.admin.base.util.PageInfo;
import com.byzk.p2p.admin.system.dto.MemberLevel;
import com.byzk.p2p.admin.system.service.MemberService;

@Controller
@RequestMapping("/admin/member")
public class MemberLevelController  implements Serializable {
	@Autowired
	private MemberService memberService;
	
	@RequestMapping(value="/listLevel")
	public ModelAndView listLevel(Model model,
			@RequestParam(value = "index", required = false, defaultValue = "1") int index,
			@RequestParam(value = "limit", required = false, defaultValue = "10") int limit) {
		PageInfo<MemberLevel> pageInfo = (PageInfo<MemberLevel>) memberService.listAll1(null, index, limit);
		model.addAttribute("pageInfo", pageInfo);
		return new ModelAndView("/admin/level/list");
	}
	
}
